import { Component, lazy, Suspense } from "react";

const Child = lazy(() => import("./Child"));

export default class Parent extends Component {
  render() {
    return (
      <>
        <h2>父组件</h2>
        <Suspense fallback={<div>loading....</div>}>
          <Child />
        </Suspense>
      </>
    );
  }
}
